Skip to content

fix: standardize error handling and improve resilience across SDK#246

Open
luk384090-cloud wants to merge 8 commits into
mainfrom
dev/errors
Open

fix: standardize error handling and improve resilience across SDK#246
luk384090-cloud wants to merge 8 commits into
mainfrom
dev/errors

Conversation

@luk384090-cloud

Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request improves error handling, parsing, and resilience across various API clients and protocols, including adding transient error retries with backoff in AsynchronousApi, extracting structured error codes and messages from JSON/non-JSON responses, and standardizing error types using the ErrorType enum. The review feedback highlights a potential NullPointerException in DashScopeResult due to auto-unboxing of a nullable Integer status code, suggests preserving a fallback error message in AgentStudioEventStream when the response body is empty, and recommends properly handling InterruptedException in AsynchronousApi instead of swallowing it.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/main/java/com/alibaba/dashscope/common/DashScopeResult.java Outdated
Comment thread src/main/java/com/alibaba/dashscope/common/DashScopeResult.java
Comment thread src/main/java/com/alibaba/dashscope/common/DashScopeResult.java
Comment thread src/main/java/com/alibaba/dashscope/api/AsynchronousApi.java
Comment thread src/main/java/com/alibaba/dashscope/api/AsynchronousApi.java
Comment thread src/main/java/com/alibaba/dashscope/api/AsynchronousApi.java Outdated
Comment thread src/main/java/com/alibaba/dashscope/api/AsynchronousApi.java
Comment thread src/main/java/com/alibaba/dashscope/api/AsynchronousApi.java
Comment thread src/main/java/com/alibaba/dashscope/audio/http_tts/HttpSpeechSynthesizer.java Outdated
Comment thread src/main/java/com/alibaba/dashscope/protocol/okhttp/OkHttpHttpClient.java Outdated
Comment thread src/main/java/com/alibaba/dashscope/protocol/okhttp/OkHttpWebSocketClient.java Outdated
Comment thread src/main/java/com/alibaba/dashscope/utils/OSSUtils.java Outdated
Comment thread src/main/java/com/alibaba/dashscope/utils/OSSUtils.java Outdated
Comment thread src/main/java/com/alibaba/dashscope/audio/http_tts/HttpSpeechSynthesizer.java Outdated
Comment thread src/main/java/com/alibaba/dashscope/common/DashScopeResult.java Outdated
Comment thread src/main/java/com/alibaba/dashscope/protocol/okhttp/OkHttpHttpClient.java Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants